-
Notifications
You must be signed in to change notification settings - Fork 776
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add Bound
constructors for PyByteArray
and PyMemoryView
#3786
Conversation
CodSpeed Performance ReportMerging #3786 will improve performances by 12.92%Comparing Summary
Benchmarks breakdown
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Brilliant, thank you yet again! Good pick to choose these ones; I'd totally forgotten they needed constructors added still.
Since the original from constructor used as_ptr(), which returns a borrowed ptr, I used a borrowed &Bound for the new one. Please correct me if I'm wrong here.
&Bound
is exactly right based on what we've been doing elsewhere 👍
Just one tiny detail which is a suggestion to improve the surrounding code a tiny bit while we're there...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect, thanks again!
Btw, if you are interested in some reviewing as well as coding, I've started keeping a list on #3684, some help getting those reviewed and merged would go a long way towards getting this new API shipped! |
I'll have a look and leave some comments. |
Part of #3684
The adds the
Bound
constructors forPyByteArray
andPyMemoryView
.Since the original
from
constructor usedas_ptr()
, which returns a borrowed ptr, I used a borrowed&Bound
for the new one. Please correct me if I'm wrong here.